import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'
import router from './router'
import store from './store'

// 抑制ResizeObserver错误
const originalError = window.console.error;
window.console.error = (...args) => {
  if (args[0] && typeof args[0] === 'string' && args[0].includes('ResizeObserver')) {
    // 忽略ResizeObserver循环错误
    return;
  }
  originalError.apply(window.console, args);
};

const app = createApp(App)

app.use(store)
app.use(router)
app.use(ElementPlus, {
  size: 'default',
  zIndex: 3000,
  // 使用按需引入组件，减少不必要的监听器实例
  experimentalFeatures: {
    // 开启性能优化项
    performance: true
  }
})

app.mount('#app') 